tg-me.com/javaproglib/6707
Last Update:
⚙️ Интеграция Redis в Spring Boot с AI
Нужно быстро подключить Redis для кеширования, блокировок, хранения состояний или очередей задач — без лишней возни с конфигами и шаблонами? AI сгенерирует код под ключ — учитывая назначение, паттерны и лучшие практики.
📝 Промпт:
Generate a Spring Boot service that integrates with Redis to handle [caching / rate limiting / distributed locks / task queues] for [описание бизнес-логики].
Include configuration, connection pooling, and example use cases.
Ensure reliability with TTL management, error handling, and fallback mechanisms.
Use Spring Data Redis or Lettuce/Jedis client. Explain the trade-offs of chosen technologies and patterns (e.g., Cache Aside, Write-Through).
— Добавьте
also include support for Redis Streams (or Pub/Sub) for event-driven processing with examples
для включения Redis Streams или Pub/Sub.— Добавьте
use Lua scripts for atomic operations and provide sample use cases (e.g., rate limiting or locking)
для Lua-скриптов.— Добавьте
integrate Spring Boot Actuator and Redis metrics for monitoring cache performance (hit/miss, TTL, etc.)
для мониторинга кеша и статистики.